package com.bbcare.switchData.entity.basemodel;



import org.apache.commons.lang.StringUtils;

import java.io.Serializable;


/**
 * 数据Entity类
 *
 */
public abstract class BaseEntityForBB<T> implements   Serializable {

    private static final long serialVersionUID = -2221494740984341426L;

    protected String id; 				// 主键

    protected String remark; 		// 备注

//    protected Integer status; 		// 状态标记（一般用于停用、启用，0：停用；-1：启用）

    private Integer orderNo; 		// 排序字段

    private String queryBeginDate; 	// 查询开始日期
    private String queryEndDate; 	// 查询结束日期
    private String groupBy;

    private String ticket;
    private String tenantId;

    protected String additionalSql; //附加的sql语句, 仅限用于拼接特殊的 where 条件

    public String getTicket() {
        return ticket;
    }

    public void setTicket(String ticket) {
        this.ticket = ticket;
    }

    // 用于批量删除参数
    protected String ids;

    public BaseEntityForBB() {
        super();
    }


    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

//    public Integer getStatus() {
//        return status;
//    }
//
//    public void setStatus(Integer status) {
//        this.status = status;
//    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIds() {
        return ids;
    }

    public void setIds(String ids) {
        this.ids = ids;
    }

    public Integer getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(Integer orderNo) {
        this.orderNo = orderNo;
    }

    public String getQueryBeginDate() {
        return queryBeginDate;
    }

    public void setQueryBeginDate(String queryBeginDate) {
        this.queryBeginDate = queryBeginDate;
    }

    public String getQueryEndDate() {
        return queryEndDate;
    }

    public void setQueryEndDate(String queryEndDate) {
        if(StringUtils.isNotEmpty(queryEndDate)){
            //精确查询结束时间
            if(queryEndDate.indexOf("23:59:59") < 0){
                queryEndDate += " 23:59:59";
            }
            this.queryEndDate = queryEndDate;
        }
    }

    public String getGroupBy() {
        return groupBy;
    }

    public void setGroupBy(String groupBy) {
        this.groupBy = groupBy;
    }

    public String getAdditionalSql() {
        return additionalSql;
    }

    public void setAdditionalSql(String additionalSql) {
        this.additionalSql = additionalSql;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }
}
